package com.zm.service;

import com.zm.bean.BatJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class DemoService {

    @Autowired
    private RestTemplate restTemplate;

    public   String getForString(String url){
        return  restTemplate.getForObject(url,String.class);
    }

    public BatJson getForObject(String url){
        return  restTemplate.getForObject(url,BatJson.class);
    }

}
